<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
	<script type="text/javascript" src="scripts/boot.js"></script>
	<style type="text/css">
	    .mini-radiobuttonlist-td
	    {
	    	height: 25px;
	    }
	</style>
</head>
<body>
	<fieldset style="border:solid 1px #aaa;padding:3px;">
		<legend >客户电话</legend>
        <input name="callId" class="mini-hidden" />
        <div id="form1" style="padding-left:5px;padding-bottom:7px;">
            <div id="datagrid1" class="mini-datagrid" style="width:740px;height:auto;" showLoading="false" allowResize="false"
        		url="orders_find_tel_view.do"  idField="id" showPager="false">
		        <div property="columns">
		            <div field="phoneNum" width="20%" headerAlign="center" >号码
		                <input property="editor" name="phoneNum" class="mini-textbox" style="width:100%;" />
		            </div>
		            <div type="comboboxcolumn" field="type" width="10%" headerAlign="center" >类型
		                <input property="editor" name="type" valueField="keyName" textField="keyValue" class="mini-combobox" style="width:100%;" url="dictionary_cm_key_val_view.do?typeName=CUSTOMER_PHONE_TYPE" />          
		            </div>
		            <div type="comboboxcolumn" field="isMain" width="10%" headerAlign="center" >是否主要
		            	<input property="editor" name="isMain" class="mini-combobox" style="width:100%;" data="[{ id: 1, text: '是' }, { id: 0, text: '否'}]" />
		            </div>
		            <div field="remarks" width="35%" headerAlign="center">备注
		                <input property="editor" name="remarks" class="mini-textbox" style="width:100%;"/>
		            </div>
		        </div>
    		</div>
        </div>
    </fieldset>
    <form id="form2" method="post">
	    <fieldset style="border:solid 1px #aaa;padding:3px;">
	        <legend >基本信息</legend>
	        <div style="padding:10px;">
			    <table cellspacing="15px;" cellpadding="0px;">
			        <tr>
			            <td>姓名：</td>
			            <td style="width:250px;">    
			                <input name="name" style="width: 150px;" class="mini-textbox" enabled="false"/>
			            </td>
			            <td>性别：</td>
			            <td >                        
			                <input name="sex" class="mini-radiobuttonlist" repeatItems="1" repeatLayout="table" repeatDirection="vertical" textField="keyValue" valueField="keyName"
			                	url="dictionary_cm_key_val_view.do?typeName=CUSTOMER_SEX_TYPE" onbeforeshowpopup="onbeforeshowpopup" enabled="false"/>
			            </td>
			        </tr>
			        <tr>
			            <td >出生日期：</td>
			            <td >    
			                <input name="birthDate" style="width: 150px;" class="mini-datepicker" emptyText="请选择日期" enabled="false"/>
			            </td>
			            <td>客户级别：</td>
			            <td >    
			                <input name="customerLevel" style="width: 150px;" class="mini-combobox" valueField="keyName" textField="keyValue"
			                 	url="dictionary_cm_key_val_view.do?typeName=CUSTOMER_LEVEL_TYPE" enabled="false"/>
			            </td>
			        </tr>
			        <tr>
			        	<td>客户来源：</td>
			        	<td>
			        		<input name="customersSource" id="customers_source" style="width: 150px;" valueField="keyName" textField="keyValue" class="mini-combobox"
			        		 url="dictionary_cm_key_val_view.do?typeName=CUSTOMER_SOURCE_TYPE" enabled="false"/>
			        	</td>
			        	<td>是否邮寄期刊：</td>
			        	<td>
			        		<input name="journal" style="width: 150px;" valueField="keyName" textField="keyValue" class="mini-combobox"
			        		 url="dictionary_cm_key_val_view.do?typeName=CUSTOMER_MAIL_TYPE" enabled="false"/>
			        	</td>
			        </tr>
			        <tr>
			        	<td>地址：</td>
			        	<td colspan="3">
			        		<input id="province" name="pName" class="mini-textbox" enabled="false"/>
			        		<input class="mini-textbox" name="cName" id="city" readOnly="true" enabled="false"/>
			        		<input class="mini-textbox" name="dName" id="district" readOnly="true" enabled="false"/>
			        		<span>邮编：</span>
			        		<input class="mini-textbox" name="zipCode" style="width: 85px;" enabled="false"/>
			        	</td>
			        </tr>
			        <tr>
			        	<td>详细地址：</td>
			        	<td colspan="3">
			        		<input name="address" class="mini-textbox" style="width:400px;" enabled="false"/>
			        	</td>
			        </tr>
			        <tr>
			        	<td>会员信息：</td>
			            <td colspan="3"> 
			            	<span>余额：</span>   
			                <input name="money" class="mini-textbox" style="width: 95px;" enabled="false"/>
			                <span>积分：</span>
			                <input name="integral" class="mini-textbox" style="width: 72px;" enabled="false"/>
			                <span>红包：</span>
			                <input name="redEnvelopes" class="mini-textbox" style="width: 72px;" enabled="false"/>
			            </td>
			        </tr>
			        <tr>
			            <td>推荐人：</td>
			            <td>
			            	<input name="recommended" style="width: 150px;" class="mini-textbox" enabled="false"/>
			            </td>
			        </tr>
			        <tr>
			            <td >备注：</td>
			            <td colspan="3">
			                <input name="remarks" class="mini-textarea" style="width:400px;" enabled="false"/>
			            </td>
			        </tr>
			    </table>
	        </div>
	    </fieldset>
	</form>
</body>
</html>

<script type="text/javascript">
	mini.parse();
	var grid = mini.get("datagrid1");
 	
 	// 标准方法接口定义
    var form2 = new mini.Form("form2");
	function SetData(data) {
		data = mini.clone(data);
		$.post("audit_customer_detail_view.do", {customerId: data.customerId}, function(data){
			if(null != data.customer) {
				grid.load({customerId: data.customer.id});
				form2.setData(data.customer);
			}
		}, "json");
	}
</script>